<?php
/**
 * 后台管理首页 - JBlog
 *
 * @copyright (c) 2008-2010 JBlog (www.lisijie.org)
 * @author lisijie <lisijie86@gmail.com>
 * @version $Id: mod_main.php 385 2010-04-25 08:14:46Z lisijie86 $
*/

!defined('IN_ADMIN') && exit('Access Denied!');

if ( $ac == 'phpinfo' ) {
	phpinfo();
} else {
	$stat = get_statistics();

	$arccount = '共有日志 <span style="color:green;font-weight:bold;font-size:16px;font-family:Constantia,Georgia;">'.$stat['arcnum'].'</span> 篇';
	if ( $a = $db->count('post',"`type` = 'blog' AND `status` = '-1'") ) {
		$arccount .= '，其中有 <span style="color:#f60;font-weight:bold;font-size:26px;font-family:Constantia,Georgia;">'.$a.'</span> 篇草稿';
	}
	if ( $b = $db->count('post',"`type` = 'blog' AND `status` = '0'") ) {
		$arccount .= '，<span style="color:#f60;font-weight:bold;font-size:26px;font-family:Constantia,Georgia;">'.$a.'</span> 篇未审核';
	}
	$cmtcount = '共有评论 <span style="color:green;font-weight:bold;font-size:16px;font-family:Constantia,Georgia;">'.$stat['cmtnum'].'</span> 条';
	if ( $c = $db->count('comment', "`status` = '0'") ) {
		$cmtcount .= '，其中有 <span style="color:#f60;font-weight:bold;font-size:26px;font-family:Constantia,Georgia;">'.$c.'</span> 条等待审核。';
	}

	$file_upload = $stat['max_upload'] == 'unknown' ? '<font color="red">禁止</font>' : '允许 '.$stat['max_upload'];

	$register_globals = $stat['register_globals'] ? '<font color="red">开启</font>' : '关闭';
	$gd_version = $stat['gd_version'] == 'unknown' ? '<font color="red">不支持</font>' : '支持：'.$stat['gd_version'];

	require admin_tpl('main');
}
?>